package test.study.nosql.mongodb.template;

import lombok.extern.slf4j.Slf4j;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import study.nosql.mongodb.support.SpringBootCfg;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SpringBootCfg.class)
public class _9_ {

    @Autowired
    protected MongoTemplate mongoTemplate;

//    @Test
//    public void a_test() {
//        Query query = new Query();
//        TypedAggregation agg = Aggregation.newAggregation(Aggregation.project(),
//                Aggregation.group().sum(""));
//
//        AggregationResults<MapResult> aggResults  = mongoTemplate.aggregate(agg, "item");
//        aggResults.g
////        log.info(">>>>>> {}", count);
//    }
}
